package com.itheima.stock.mapper;

import com.itheima.stock.pojo.domain.InnerMarketDomain;
import com.itheima.stock.pojo.domain.OuterMarketDomain;
import com.itheima.stock.pojo.entity.StockMarketIndexInfo;
import org.apache.ibatis.annotations.Param;
import org.joda.time.DateTime;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
* @author hyx
* @description 针对表【stock_market_index_info(国内大盘数据详情表)】的数据库操作Mapper
* @createDate 2024-05-22 20:50:24
* @Entity com.itheima.stock.pojo.entity.StockMarketIndexInfo
*/
public interface StockMarketIndexInfoMapper {

    int deleteByPrimaryKey(Long id);

    int insert(StockMarketIndexInfo record);

    int insertSelective(StockMarketIndexInfo record);

    StockMarketIndexInfo selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(StockMarketIndexInfo record);

    int updateByPrimaryKey(StockMarketIndexInfo record);

    List<InnerMarketDomain> innerIndexAll(@Param("marketIds") List<String> marketIds, @Param("timePoint") Date timePoint);


    List<Map<String,Long>> stockTradeVol4InnerMarket(@Param("openTime") Date openTime, @Param("curTime4T") Date curTime4T, @Param("inner") List<String> inner);

    /**
     * 批量插入股票大盘数据
     * @param infos
     */
    int insertBatch(@Param("infos") List<StockMarketIndexInfo> infos);

}
